Make seq concatenation operate on sequence tuples#162
Open
coord-e wants to merge 2 commits into
Open
Conversation
This was referenced Jul 1, 2026
84a3441 to
8b876de
Compare
8b1d9a7 to
e14038b
Compare
c720ea2 to
ecd5d85
Compare
Rename `ArrayConcat`/`ArrayConcatTerm` to `SeqConcat`/`SeqConcatTerm` and the SMT `concat_int_array` definition to `seq_concat`, and have them carry the two sequences as whole `(array, length)` tuples (`seq1`/`seq2`) rather than four destructured array/length terms. The `seq_concat` definition now takes two tuple parameters and projects their fields internally instead of accepting the array and length as separate parameters, and the select peephole projects the tuple fields accordingly. The `(array, length)` tuple datatype is now always declared for every int-array element sort a `seq_concat` definition is emitted for, so the definition type-checks even when no sequence value of that element sort otherwise appears in the system. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GzapTuen2mKHkkN3B7d8qi
e14038b to
ee5d0b2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR 2 of 4 restructuring #153. Now that #161 is merged, this is based directly on
main.Rename
ArrayConcat/ArrayConcatTermtoSeqConcat/SeqConcatTermand the SMTconcat_int_arraydefinition toseq_concat, and have them carry the two sequences as whole(array, length)tuples (seq1/seq2) rather than four destructured array/length terms. Theseq_concatdefinition now takes two tuple parameters and projects their fields internally instead of accepting the array and length as separate parameters. The select peephole projects the tuple fields accordingly.Details
(array, length)tuple datatype is now always declared for every int-array element sort aseq_concatdefinition is emitted for, so the definition type-checks even when no sequence value of that element sort otherwise appears in the system.Validation
cargo build,cargo fmt --all -- --check,cargo clippy -- -D warningscargo test— Spacer-backed tests pass.define-fun-recwas dumped viaTHRUST_OUTPUT_DIRand checked directly with z3: it emits asseq_concat<…>, parses, and on a ground instance evaluates the concatenation exactly as before. (PCSat-backed tests require the CoAR Docker image and were not run here.)Stack
split_first/split_last(_mut) (Add subsequence and slice split operations #164)🤖 Generated with Claude Code
https://claude.ai/code/session_01GzapTuen2mKHkkN3B7d8qi